package com.xiaoshuidi.cloud.module.contract.convert.roommeta;

import com.xiaoshuidi.cloud.module.contract.controller.admin.roommate.vo.*;
import com.xiaoshuidi.cloud.module.contract.dal.dataobject.roommeta.ContractRoommateDO;
import com.xiaoshuidi.cloud.module.contract.dal.dataobject.roommeta.ContractRoommateLogDO;
import com.xiaoshuidi.cloud.module.contract.vo.ContractRoommateApiVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 合同同住人数据 Convert
 *
 * @author test123
 */
@Mapper
public interface ContractRoommateConvert {

    ContractRoommateConvert INSTANCE = Mappers.getMapper(ContractRoommateConvert.class);

    ContractRoommateDO convert(ContractRoommateCreateReqVO bean);

    ContractRoommateDO convert(ContractRoommateUpdateReqVO bean);

    ContractRoommateDO convert(ContractRoommateImportExcelVO bean);

//    ContractRoommateLogDO convert1(ContractRoommateDO bean);

    ContractRoommateRespVO convert(ContractRoommateDO bean);
    List<ContractRoommateRespVO> convertList(List<ContractRoommateDO> list);

    List<ContractRoommateDO> convertList02(List<ContractRoommateReqVO> list);

    List<ContractRoommateListReqVO> convertList03(List<ContractRoommateDO> list);

    @Mapping(target = "roommateId", source = "id")
    ContractRoommateLogDO convertRoommate2RoommateLog(ContractRoommateDO bean);

    List<ContractRoommateApiVO> convertList2Api(List<ContractRoommateDO> list);

    List<ContractRoommateLogDO> convertList1(List<ContractRoommateDO> bean);
}
